package microassembler;

class baseconv
{

    baseconv()
    {
    }

    public static String dec2bin(int i)
    {
        return dec2bin(i, -1);
    }

    public static String dec2bin(int i, int j)
    {
        String s = Integer.toString(i, 2);
        for(int k = s.length() + 1; k <= j; k++)
        {
            s = "0" + s;
        }

        return s;
    }
}
